package Com.Hupochuan.Dal.Tab;

import java.util.Hashtable;
import java.util.List;
import java.util.Vector;

import Com.Hupochuan.Dal.DBManager.DBManager;
import Com.Hupochuan.Vo.FriendLink;

public class FriendLinkTab {
	/*
	 * 本类私有对象
	 */
	private DBManager<FriendLink> dbManager = new DBManager<FriendLink>(FriendLink.class);
	
	/*
	 * 单一实例
	 */
	private FriendLinkTab(){}
	private static FriendLinkTab friendLinkTab = new FriendLinkTab();
	public static FriendLinkTab getObject(){
		return friendLinkTab;
	}
	
	/*
	 * 查询友情链接列表
	 */
	public List<FriendLink> findFriendLinkList(){
		
		//参数部分
		List<FriendLink> friendLinkList = new Vector<FriendLink>();
		StringBuffer sqlBuff = new StringBuffer();
		Hashtable<String,Object> paraHash = new Hashtable<String,Object>();
		
		//sql语句部分
		sqlBuff.append(" select * from FriendLink order by weight desc,id ");
		
		//执行sql 
		friendLinkList = this.dbManager.querySqlReturnVoList(sqlBuff.toString(),paraHash);
		
		//返回列表
		return friendLinkList;
	}
}
